package de.cachaca.lildancefreak.valerie;

import de.cachaca.lildancefreak.Calculator;

// ich habe jetzt was geändert und will es pierre zeigen
public class CalculatorImplValerie implements Calculator {

	double tempValue = 0.0;
	
	public CalculatorImplValerie() {
	}

	public CalculatorImplValerie(double initValue) {
		
		tempValue = initValue;
	}

	@Override
	public void add(double value) {
		

		tempValue = getResult() + value;
		
	}

	@Override
	public void subtract(double value) {
		
		tempValue = tempValue - value;
	}

	@Override
	public void multiply(double value) {
		
		tempValue = tempValue * value;
	}

	@Override
	public double getResult() {
		return this.tempValue;
		
	}

	@Override
	public void reset(double value) {
		tempValue = value;
	}

	@Override
	public boolean isValuePositive() {
		
		if(tempValue < 0)
			return false;
		else return true;
	}

}
